package com.fjrz.bbxwj.entity

import com.module.lemlin.rxhttp.HttpServiceData

data class CommentGroupResponse(
    val data: Data1Page<CommentGroup>
) : HttpServiceData() {
    var loadMore = false
}

data class CommentGroup(
    val at_comment_id: Int,
    val at_user_id: Int,
    val base_comment_id: Int,
    val child_comments_count: Int,
    val content: String,
    val createtime: Long,
    val id: Int,
    val latest_child_comment: CommentChild?,
    var like: Int,
    var likes: Int,
    val user: User,
    val user_id: Int,
    val video_id: Int
) {
    var commentChildList: MutableList<CommentChild>? = mutableListOf()

    fun setCommentChildItem(commentChilds: MutableList<CommentChild>) {
        if (commentChildList.isNullOrEmpty()) {
            commentChildList = mutableListOf()
        }
        commentChildList?.clear()
        commentChildList?.addAll(commentChilds)
    }
}

data class CommentChildResponse(
    val data: Data1Page<CommentChild>
) : HttpServiceData() {
    var position: Int = 0
}

data class CommentChild(
    val at_comment_id: Int,
    val at_user_id: Int,
    val base_comment_id: Int,
    val content: String,
    val createtime: Long,
    val id: Int,
    val user: User,
    val at_user: User?,
    val user_id: Int,
    val video_id: Int
)

data class CommentGreatResponse(
    val data: Any
) : HttpServiceData() {
    var position: Int = 0
    var isList: Int = 0
}


data class CommentSubmitResponse(
    val data: CommentSubmit
) : HttpServiceData()

data class CommentSubmit(
    val comment_count:Any
)